﻿using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;

namespace MGFramework {
    public class CopyFileManager
    {
        public static bool CopyFile(string source_file, string target_directory,string file_name) {
            if (!Directory.Exists(target_directory)) {
                try
                {
                    Directory.CreateDirectory(target_directory);
                }
                catch {
                    return false;
                }
            }
            try
            {
                File.Copy(source_file, target_directory + file_name);
                return true;
            }
            catch {
                return false;
            }
        }
    }
}
